Optimal. Leaf size=40 \[ a c x+\frac {(b c+a d) x^{1+n}}{1+n}+\frac {b d x^{1+2 n}}{1+2 n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {380}
\begin {gather*} \frac {x^{n+1} (a d+b c)}{n+1}+a c x+\frac {b d x^{2 n+1}}{2 n+1} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 380
Rubi steps
\begin {align*} \int \left (a+b x^n\right ) \left (c+d x^n\right ) \, dx &=\int \left (a c+(b c+a d) x^n+b d x^{2 n}\right ) \, dx\\ &=a c x+\frac {(b c+a d) x^{1+n}}{1+n}+\frac {b d x^{1+2 n}}{1+2 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 37, normalized size = 0.92 \begin {gather*} x \left (a c+\frac {(b c+a d) x^n}{1+n}+\frac {b d x^{2 n}}{1+2 n}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 39, normalized size = 0.98
method | result | size |
risch | \(a c x +\frac {\left (a d +b c \right ) x \,x^{n}}{1+n}+\frac {b d x \,x^{2 n}}{1+2 n}\) | \(39\) |
norman | \(a c x +\frac {\left (a d +b c \right ) x \,{\mathrm e}^{n \ln \left (x \right )}}{1+n}+\frac {b d x \,{\mathrm e}^{2 n \ln \left (x \right )}}{1+2 n}\) | \(43\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 48, normalized size = 1.20 \begin {gather*} a c x + \frac {b d x^{2 \, n + 1}}{2 \, n + 1} + \frac {b c x^{n + 1}}{n + 1} + \frac {a d x^{n + 1}}{n + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.37, size = 69, normalized size = 1.72 \begin {gather*} \frac {{\left (b d n + b d\right )} x x^{2 \, n} + {\left (b c + a d + 2 \, {\left (b c + a d\right )} n\right )} x x^{n} + {\left (2 \, a c n^{2} + 3 \, a c n + a c\right )} x}{2 \, n^{2} + 3 \, n + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 236 vs.
\(2 (34) = 68\).
time = 0.18, size = 236, normalized size = 5.90 \begin {gather*} \begin {cases} a c x + a d \log {\left (x \right )} + b c \log {\left (x \right )} - \frac {b d}{x} & \text {for}\: n = -1 \\a c x + 2 a d \sqrt {x} + 2 b c \sqrt {x} + b d \log {\left (x \right )} & \text {for}\: n = - \frac {1}{2} \\\frac {2 a c n^{2} x}{2 n^{2} + 3 n + 1} + \frac {3 a c n x}{2 n^{2} + 3 n + 1} + \frac {a c x}{2 n^{2} + 3 n + 1} + \frac {2 a d n x x^{n}}{2 n^{2} + 3 n + 1} + \frac {a d x x^{n}}{2 n^{2} + 3 n + 1} + \frac {2 b c n x x^{n}}{2 n^{2} + 3 n + 1} + \frac {b c x x^{n}}{2 n^{2} + 3 n + 1} + \frac {b d n x x^{2 n}}{2 n^{2} + 3 n + 1} + \frac {b d x x^{2 n}}{2 n^{2} + 3 n + 1} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 83 vs.
\(2 (40) = 80\).
time = 0.83, size = 83, normalized size = 2.08 \begin {gather*} \frac {2 \, a c n^{2} x + b d n x x^{2 \, n} + 2 \, b c n x x^{n} + 2 \, a d n x x^{n} + 3 \, a c n x + b d x x^{2 \, n} + b c x x^{n} + a d x x^{n} + a c x}{2 \, n^{2} + 3 \, n + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.48, size = 38, normalized size = 0.95 \begin {gather*} a\,c\,x+\frac {x\,x^n\,\left (a\,d+b\,c\right )}{n+1}+\frac {b\,d\,x\,x^{2\,n}}{2\,n+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________